package com.develop.BeanUtils;

/**
 * 消息类型
 * 
 * @author Lenovo
 *
 */
public enum MsgType {
	realTimeAlarm(0, "realTimeAlarm"), 
	reqLoginAlarm(1, "reqLoginAlarm"),
	ackLoginAlarm(2, "ackLoginAlarm"), 
	reqSyncAlarmMsg(3, "reqSyncAlarmMsg"),
	ackSyncAlarmMsg(4, "ackSyncAlarmMsg"),
	reqSyncAlarmFile(5, "reqSyncAlarmFile"),
	ackSyncAlarmFile(6,"ackSyncAlarmFile"),
	ackSyncAlarmFileResult(7, "ackSyncAlarmFileResult"),
	reqHeartBeat(8, "reqHeartBeat"), 
	ackHeartBeat(9, "ackHeartBeat"), 
	closeConnAlarm(10, "closeConnAlarm");
	private String name;
	private int index;

	private MsgType(int index, String name) {
		this.name = name;
		this.index = index;
	}

	public String getName() {
		return name;
	}

	public int getIndex() {
		return index;
	}

	public static void main(String[] args) {
		System.out.println(MsgType.realTimeAlarm);
		System.out.println(MsgType.realTimeAlarm.getIndex());
	}
}
